From: Florian Müllner Date: Wed, 13 Apr 2016 19:22:56 +0000 (+0200) Subject: recorder: Fall back to ~ if XDG_VIDEOS_DIR doesn't exist X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~885 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c039a3ddda97ee0aff8563f9dc61f9814f95b9dd;p=gnome-shell.git recorder: Fall back to ~ if XDG_VIDEOS_DIR doesn't exist Unlike screenshots, recordings fail when the default directory doesn't exist. Fall back to home instead. https://bugzilla.gnome.org/show_bug.cgi?id=765015 --- diff --git a/src/shell-recorder.c b/src/shell-recorder.c index 62ef0c4cc..84d68f56b 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -944,6 +944,9 @@ get_absolute_path (char *maybe_relative) else { const char *video_dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS); + if (!g_file_test (video_dir, G_FILE_TEST_EXISTS)) + video_dir = g_get_home_dir (); + path = g_build_filename (video_dir, maybe_relative, NULL); }